<? include('header.php'); ?>

<? foreach($posts as $post): ?>

<h2><?=$post['title']?></h2>

<p>
<?=$post['text']?>
</p>

<a href="<?=base_url()?>/edit/<?=$post['id']?>">Edit</a> - <a href="<?=base_url()?>/delete/<?=$post['id']?>">Delete</a>

<? endforeach; ?>

<p><a href="<?=base_url()?>/add">Add new</a></p>

<? include('footer.php'); ?>


